
<script type="text/javascript" src="__MOBILE__/default/js/mobile/jquery.js"></script>
<script type="text/javascript" src="__MOBILE__/js/jquery-ui/jquery-ui.js"></script>

<script type="text/javascript" src="__MOBILE__/js/dialog.js"></script>
<script class="ng-scope">
$(".dropdowncentermenu").css("display", "none");
$(".dropdowncentermenu2").css("display", "none");
$("#maintitle").html ("个人中心 - 帐号设置"); 
$(".navbar-absolute-bottom").css ("display" , "none");
$(".infopanel").css ("display" , "none");
$(".navbar-brand-center").css ("margin-left" , "0px");
checkmargin ();
</script>
<script type="text/javascript">
function saveAddress1() {
    var Consignee = $('#txtConsignee').val();
    var Address = $('#txtAddress').val();
    var Consignee_mobile = $('#txtMobil').val();

    if (Address == '') {
      dialog.error('消息', '地址不能为空！');
      $('#content').focus();
      return;
    }
    if (Consignee == '') {
        dialog.error('消息', '收货人不能为空！');
        $('#content').focus();
        return;
      }   
    if (Consignee_mobile == '') {
          dialog.error('消息', '手机号不能为空！');
          $('#content').focus();
          return;
        }
	if(!(/^[1][3-8]\d{9}$/.test(Consignee_mobile))){
		dialog.error('消息', '手机格式错误！');
		return;
	}
    $.ajax({
      url : '/index.php/UserCenter/saveAddress',
      type : 'POST',
      loading : true,
      dataType: "json",
      data : {
    	  Consignee:Consignee,
    	  Consignee_Mobile : Consignee_mobile,
    	  Address : Address,
    	  
      },
      success : function(res) {
        if (res.success) {
          dialog.alert('消息',res.message);
      	setTimeout(function(){
    		window.location.reload()
    	},3000);
        } else {
          dialog.error('消息',res.message);
        }
      }
    });
  }
</script>
<style class="ng-scope">.has-navbar-top .app-body { padding-top: 72px; }</style>
<div class="scrollable ng-scope">
<div class="scrollable-content member-setting overthrow">

<div>

  <div class="clearfix margintop10 marginleft10">
      <div class="fl"><img src="__MOBILE__/default/images/mobile/cash/icouser.jpg" width="47" height="46" alt=""/></div><div class="fl blue cnbig1 marginleft10 margintop15">{$user.member_name}</div>
    </div>
    <div class="settingmenu margintop10 clearfix">
        <a href="#/center/index/1" class="colbtn">
          <img src="__MOBILE__/default/images/mobile/cash/icolock.jpg" width="73" height="74" alt=""/>
            <p class="margintop10">安全设置</p>
           
        </a>
        <a href="#/center/address" class="colbtn">
          <img src="__MOBILE__/default/images/mobile/cash/icouser2.jpg" width="73" height="74" alt=""/>
            <p class="margintop10">账号设置</p>
             <div class="settingarrow"></div>
         
        </a>
        <a href="#/center/notices" class="colbtn">
          <img src="__MOBILE__/default/images/mobile/cash/icoreport.jpg" width="73" height="74" alt=""/>
            <p class="margintop10">消息中心</p>
            
        </a>
    </div>
    
      <!-- 帐号设置 -->
      <div>
        <div class="padding20">
        		  收货地址 填写真实资料，逢年过节时，我们可能给忠实会员派送小礼物哦！
        </div>
        <div class="padding20">
          <div class="textbox clearfix"><label for="txtCity">
            <div class="col1 fl">收货地址</div>
              <div class="col2 fl"><input id="txtAddress" type="text" class="textfield1 needsclick" value="{$user.address}" placeholder="(请填写)"></div>
          </label></div>
          <!-- <div class="textbox clearfix"><label for="txtStreet">
            <div class="col1 fl">街道</div>
              <div class="col2 fl"><input id="txtStreet" type="text" class="textfield1 needsclick" value=""></div>
          </label></div> -->
          <div class="textbox clearfix"><label for="txtConsignee">
            <div class="col1 fl">收货人</div>
              <div class="col2 fl"><input id="txtConsignee" type="text" class="textfield1 needsclick" value="{$user.Consignee}" placeholder="(请填写)"></div>
          </label></div>
          <div class="textbox clearfix"><label for="txtMobil">
            <div class="col1 fl">收货手机</div>
              <div class="col2 fl"><input id="txtMobil" type="text" class="textfield1 needsclick" value="{$user.Consignee_mobile}" placeholder="(请填写)"></div>
          </label></div>
          <div class="gap20"></div>
          <div class="submitbtn cnbig btnradius" onclick="saveAddress1()">保存</div>
        </div>
      </div>
      

    
</div>

</div>
</div>

        </div>
      </div>

    </div>
    <!-- ~ .app -->
    
    


  </body>
</html>
